import {action, observable, reaction, autorun} from "mobx";
import IndexStore from "./modules/IndexStore/IndexStore";

const todos = observable([
	{
		title: "Make coffee",
		done: true,
	},
	{
		title: "Find biscuit",
		done: false
	}
]);
reaction(
	() => todos.map(todo => todo.title),
	titles => console.warn("reaction 2:", titles.join(", "))
);
// autorun(()=>console.warn('autorun1',todos.map(todo => todo.title).join(", ") ))
 todos.push({title: "explain reactions", done: false })
// todos[0].title = "Make tea"
class AppStore {
	@observable
    count = 0;
	@observable
    options = {
        title: {
            text: "图表"
        },
        legend: {
            type: 'scroll',
            show: true,
        },
        xAxis: {
            type: 'category',
            data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun']
        },
        yAxis: {
            type: 'value'
        },
        series: [{
            data: [820, 932, 901, 934, 1290, 1330, 1320],
            type: 'line'
        }],
        textStyle: {
            color: 'red'
        }
    }
    @action
    setCount = () => {
        this.count++;
    }
}

const appStore = new AppStore()
export default {
    appStore,
    indexStore: new IndexStore(),
};


//城市,区域,镇,村名称,村编号, 小组,名称, 面积, 容积率, 分类状态, 事业部, 阶段, 价值等级, 最新备注, 最新分类修改说明, 最新备注时间,填写人
//填写人,负责人,资料整理时间 竞企名称 ..围栏
